package com.neepu.serviceImpl;

import com.neepu.dao.DocumentMapper;
import com.neepu.pojo.Document;
import com.neepu.service.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("DocumentService")
public class DocumentServiceImpl implements DocumentService {

    @Autowired
    private DocumentMapper documentMapper;

    @Override
    public void update_DocumentInfo(Document document) {
        documentMapper.update_DocumentInfo(document);
    }

    @Override
    public void insert_DocumentInfo(Document document) {
        documentMapper.insert_DocumentInfo(document);
    }

    @Override
    public List<Document> getDocument() {
        return documentMapper.getDocument();
    }

    @Override
    public Document get_DocumentInfo(Integer id) {
        return documentMapper.get_DocumentInfo(id);
    }

    @Override
    public void delete_DocumentInfo(Integer id) {
        documentMapper.delete_DocumentInfo(id);
    }

    @Override
    public List<Document> findAllDocumentByContent(String content) {
        return documentMapper.findAllDocumentByContent(content);
    }
}
